// 导出所有mock数据
export * from './statistics'
export * from './plugin'
export * from './user'

// 模拟API延迟
export const mockDelay = {
  short: 300,    // 短延迟
  normal: 800,   // 正常延迟
  long: 1500     // 长延迟
}

// 模拟API响应
export const mockResponse = {
  success: (data: any) => ({
    code: 200,
    message: 'success',
    data
  }),
  error: (message: string, code = 500) => ({
    code,
    message,
    data: null
  })
}

// 模拟API请求
export const mockRequest = async <T>(data: T, delay = mockDelay.normal): Promise<T> => {
  await new Promise(resolve => setTimeout(resolve, delay))
  return data
} 